<div class="list-group">
    <div class="products-form list-group-item">
    <?php echo $this->Form->create('Product', array('enctype' => 'multipart/form-data')); ?>
            <fieldset>
                    <legend><?php echo __('Add Product'); ?></legend>
                    <div id="form-fill">
            <?php 

             //  echo $Product['Category']['name']; 

                    echo $this->Form->input('parent_id', array('name'=>'data[Product][category_id]','selected'=>$products['Product']['category_id'], 'class'=>'form-control'));
                    echo $this->Form->input('user_id', array('type'=>'hidden'));
                    echo $this->Form->input('title', array('class'=>'form-control'));
                    ?>
                    <div class="input text required">
                        <label for="ProductStatus">Status</label>
                        <select required="required" id="ProductStatus" name="data[Product][status]"  class="form-control">
                        <option value="new" <?php if($products['Product']['status']=='new'){ echo 'selected';} ?>>New</option>
                        <option value="used" <?php if($products['Product']['status']=='used'){ echo 'selected';} ?>>Used</option>
                        <option value="other" <?php if($products['Product']['status']=='other'){ echo 'selected';} ?>>Other</option>
                        </select>
                    </div>
                    <div class="input text required">
                        <label for="ProductType">Type</label>
                        <select required="required" id="ProductType" name="data[Product][type]" class="form-control">
                        <option value="sale" <?php if($products['Product']['type']=='sale'){ echo 'selected';} ?>>Sale</option>
                        <option value="buy" <?php if($products['Product']['type']=='buy'){ echo 'selected';} ?>>Buy</option>

                        <option value="promotion" <?php if($products['Product']['type']=='promotion'){ echo 'selected';} ?>>Promotion</option>
                        <option value="other" <?php if($products['Product']['type']=='other'){ echo 'selected';} ?>>Other</option>
                        </select>
                    </div>
                        <?php

                                            echo $this->Form->input('price', array('class'=>'form-control'));
                                            echo $this->Form->input('description', array('class'=>'form-control'));
                                            echo $this->Form->input('location_id', array('class'=>'form-control'));
                                            echo $this->Form->input('address', array('class'=>'form-control'));

                        if (!empty($this->request->data['Product']['picture1'])) {
                            echo $this->Html->image('uploads/' . $this->request->data['Product']['picture1'], array('width' => '140px', 'style' => 'margin-left13px'));
                        }
                        echo $this->Form->input('picture1', array('type' => 'file','value'=>$products['Product']['picture1']));

                        if (!empty($this->request->data['Product']['picture2'])) {
                            echo $this->Html->image('uploads/' . $this->request->data['Product']['picture2'], array('width' => '140px', 'style' => 'margin-left13px'));
                        }
                        echo $this->Form->input('picture2', array('type' => 'file'));

                         if (!empty($this->request->data['Product']['picture3'])) {
                            echo $this->Html->image('uploads/' . $this->request->data['Product']['picture3'], array('width' => '140px', 'style' => 'margin-left13px'));
                        }
                        echo $this->Form->input('picture3', array('type' => 'file'));

                          if (!empty($this->request->data['Product']['picture4'])) {
                            echo $this->Html->image('uploads/' . $this->request->data['Product']['picture4'], array('width' => '140px', 'style' => 'margin-left13px'));
                        }
                        echo $this->Form->input('picture4', array('type' => 'file'));

                    echo $this->Form->input('posted_date');
                    echo $this->Form->input('expired_date');
                    echo $this->Form->input('modified_date');
            ?>
                        <?php echo $this->Form->end(__('Submit')); ?>
                    </div>
            </fieldset>
    </div>
</div>